Add Method (AddressEntries Collection)
The Add
method creates and returns a new AddressEntry
Syntax
Set objAddressEntry = objAddrEntriesColl.Add(emailtype [, name,
address ] )
Parameters
objAddressEntry
On successful
return, contains the new AddressEntry object.
objAddrEntriesColl
Required. The
AddressEntries collection object.
emailtype
Required.
String. The address type of the address entry.
name
Optional.
String. The display name or alias of the address entry.
address
Optional.
String. The full messaging address of the address entry.
Remarks
The emailtype
parameter corresponds to the PR_ADDRTYPE property and qualifies the address
parameter by specifying which messaging system the address is valid in. Typical
values are SMTP, FAX, and X400.
The name
and address parameters correspond to the Name
The user must
have permission to Add or Delete
The new AddressEntry
Example
This code
fragment adds a new entry to a user s personal address list (PAL):
' get AddressEntries collection of PAL AddressList
Set myList = MAPI.Session.AddressLists( Personal
Address List )
' add new AddressEntry to AddressEntries collection
Set newEntry = myList.Add FAX , John Doe
' add FaxNumber field to new AddressEntry and give
it a value
newEntry.Fields.Add FaxNumber , vbString
newEntry.Fields( FaxNumber ) = +1-206-555-7069
' commit new entry, field, and value to PAL
AddressList
newEntry.Update